﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;

namespace Webservice
{
    public class LeesUSB
    {
        public static Boolean KopieerBestanden(String wagennummer)
        {
            string pad = "";
            try
            {
                DriveInfo[] ListDrives = DriveInfo.GetDrives();
                foreach (DriveInfo Drive in ListDrives)
                {
                    if (Drive.DriveType == DriveType.Removable)
                        pad = Drive.Name + wagennummer;
                }



                File.Copy(@"F://20919", @"~/bestanden/"); //Van, Naar
                return true;
            }
            catch(Exception)
            {
                return false;
            }
        }
    }
}